<template>
  <div class="easyd-weixin-Box">

    <div class="selectShopListBox">
      <mt-loadmore
        :top-method="loadTop"
        :bottom-method="loadBottom"
        :bottom-all-loaded="allLoaded"
        ref="loadmore"
      >
        <div class="selectShopListItem" v-for="i in 10">
          <div class="selectShopListItemInfo">
            <div class="selectShopListItemImage">
              <img :src="imageDemoUrl" v-lazy="imageDemoUrl" v-gallery>
            </div>
            <div class="selectShopListItemContent">
              <div class="selectShopListItemContentName">去屑洗发露780g止痒油男女洗发护发</div>
              <div class="selectShopListItemContentPriceAndBtn">
                <div class="selectShopListItemContentPrice">¥99.9</div>
              </div>
            </div>
          </div>
        </div>
      </mt-loadmore>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      allLoaded: false,
      imageDemoUrl:
        "http://testfileupload.oss-cn-beijing.aliyuncs.com/shangpin1.jpg"
    };
  },
  methods: {
    addShopClick(){
        this.$router.push({
            path : '/addShop'
        })
    },
    loadTop() {
      setTimeout(() => {
        this.$refs.loadmore.onTopLoaded();
      }, 2000);
    },
    loadBottom() {
      setTimeout(() => {
        this.allLoaded = true;
        this.$refs.loadmore.onBottomLoaded();
      }, 5000);
    }
  }
};
</script>

<style lang="stylus" scoped>
@import '~PUBLIC_CSS'
.selectShopListBox {
  width: 100%;
  top: 0px;
  position: absolute;
  bottom: 0px;
  box-sizing: border-box;
  padding-left: 15px;
  padding-top: 5px;
  padding-right: 15px;
  overflow: auto;
  padding-top 15px
  -webkit-overflow-scrolling : touch;

  .selectShopListItem {
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 15px;
    $itemStyle()
  }

  .selectShopListItemInfo {
    width: 100%;
    height: 80px;
    display: flex;
  }

  .selectShopListItemImage {
    width: 100px;
    height: 80px;
    margin-right: 10px;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 5px;
    }
  }

  .selectShopListItemContent {
    flex: 1;
    position: relative;
  }

  .selectShopListItemContentName {
    width: 100%;
    height: 40px;
    font-weight: 500;
    text-align: justify;
  }

  .selectShopListItemContentPriceAndBtn {
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0px;
  }

  .selectShopListItemContentPrice {
    width: 80px;
    height: 30px;
    float: left;
    letter-spacing: 1px;
    font-weight: 500;
    font-size: 16px;
    line-height: 40px;
    color: orange;
  }

  .selectShopListItemDesc {
    width: 100%;
    height: auto;
    line-height: 22px;
    font-size: 12px;
    margin-top: 10px;
    text-align: justify;
  }

  .selectShopListMenuBox {
    width: 100%;
    display: flex;
    justify-content: space-between;
    position relative

    .selectShopListPreviewUser {
        position absolute
        right 10px
        top 10px
        bottom 0px
        line-height 45px

        i {
            color #666
            margin-left 5px
            position relative
            top -1px
        }
    }

    .selectShopListMenuItem {
      width: 100%;
      height: 45px;
      background: #FDDE6E;
      line-height: 45px;
      text-align: left;
      text-indent 10px
      margin-top: 5px;
      color: #666;
      font-weight: 500;
      margin-top: 10px;
      border-radius: 5px;
    }
  }
}
</style>

